<!--
 * @Date: 2024-08-24 16:19:40
-->
<!DOCTYPE html>
<html lang="zh">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
	<title>日志</title>
	<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-touch-fullscreen" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="default">
	<link rel="stylesheet" type="text/css" href="css/materialdesignicons.min.css">
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="css/style.min.css">
</head>

<body>
	<div class="container-fluid" style="height: 100%;padding: 16px;">

		<div class="row" style="height: calc(100% - 16px);">

			<div class="col-lg-12" style="height: 100%;">
				<div class="card" style="height: 100%;">
					<header class="card-header">
						<div class="card-title">日志内容</div>
					</header>
					<div class="card-body" style="overflow-y: scroll;">

					</div>
				</div>
			</div>

		</div>

	</div>

	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/popper.min.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script type="text/javascript" src="js/main.min.js"></script>
	<script>
		window.addEventListener("message", event => {
			if ((event.source instanceof Window && goesay) && event.data) return;
			switch (event.data.code) {
				case 0:
					add_log(event.data.data.type, event.data.data.connect);
					break;
			}

		});
		function add_log(type, text) {
			let style = "";
			switch (type) {
				case "success":
					style = "text-success";
					break;
				case "warning":
					style = "text-warning";
					break;
				case "failure":
					style = "text-danger";
					break;
				default:
					style = "text-info";
					break;
			}
			$(".card-body").prepend('<p class="' + style + '">' + text + '</p>')
		}
	</script>
</body>

</html>